From: Juanma Barranquero Date: Thu, 14 Jan 2010 14:37:13 +0000 (+0100) Subject: Fix bug#5313: editing files in hexl-mode corrupts file X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~8717 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=3a105666da6da8e774f5f4bd3a4cc6c3ef4e84e9;p=emacs.git Fix bug#5313: editing files in hexl-mode corrupts file * hexl.el (hexl-printable-character): Fix check of `hexl-iso', which is always a string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b7f3387db2f..63acd315de8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-14 Juanma Barranquero + + * hexl.el (hexl-printable-character): Fix check of `hexl-iso', + which is always a string. (Bug#5313) + 2010-01-14 Juanma Barranquero * progmodes/ada-xref.el (ada-default-prj-properties): diff --git a/lisp/hexl.el b/lisp/hexl.el index 2854ca12d45..7edf5ec10ac 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -779,11 +779,11 @@ This discards the buffer's undo information." (defun hexl-printable-character (ch) "Return a displayable string for character CH." - (format "%c" (if hexl-iso - (if (or (< ch 32) (and (>= ch 127) (< ch 160))) + (format "%c" (if (equal hexl-iso "") + (if (or (< ch 32) (>= ch 127)) 46 ch) - (if (or (< ch 32) (>= ch 127)) + (if (or (< ch 32) (and (>= ch 127) (< ch 160))) 46 ch))))